package yesjava;

import java.util.Arrays;
import java.util.Scanner;

public class MainScanner {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(Thread.currentThread().getContextClassLoader().getResourceAsStream("my.txt"));
        while (scanner.hasNextLine()){
            String next = scanner.nextLine();
            if(next.trim().length()>0){
                String[] split = next.split("\\b\\s+\\b");
                System.out.println(Arrays.asList(split));
            }
        }
    }
}
